/**
 * <copyright> </copyright>
 * 
 * $Id$
 */
package org.dengues.model.database.impl;

import java.util.HashMap;

import org.dengues.model.database.AbstractDBObject;
import org.dengues.model.database.DBColumn;
import org.dengues.model.database.DBNote;
import org.dengues.model.database.DBTable;
import org.dengues.model.database.DatabaseDiagram;
import org.dengues.model.database.DatabaseFactory;
import org.dengues.model.database.DatabasePackage;
import org.dengues.model.database.DiagramChild;
import org.dengues.model.database.EMFDataType;
import org.dengues.model.database.ForeignKey;
import org.dengues.model.database.ForeignKeyLabel;
import org.dengues.model.database.SectionColumns;
import org.dengues.model.database.SectionFilters;
import org.dengues.model.database.SectionGroups;
import org.dengues.model.database.SectionHavings;
import org.dengues.model.database.SectionSorts;
import org.dengues.model.database.SectionUnions;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;

/**
 * <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!-- end-user-doc -->
 * @generated
 */
public class DatabasePackageImpl extends EPackageImpl implements DatabasePackage {

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass dbTableEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass dbColumnEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass databaseDiagramEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass foreignKeyEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass dbNoteEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass diagramChildEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass abstractDBObjectEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass sectionColumnsEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass sectionFiltersEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass sectionGroupsEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass sectionSortsEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass sectionHavingsEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EClass sectionUnionsEClass = null;

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    private EClass foreignKeyLabelEClass = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EEnum emfDataTypeEEnum = null;

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private EDataType propMapEDataType = null;

    /**
     * Creates an instance of the model <b>Package</b>, registered with
     * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package package URI value.
     * <p>
     * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also
     * performs initialization of the package, or returns the registered package, if one already exists. <!--
     * begin-user-doc --> <!-- end-user-doc -->
     * 
     * @see org.eclipse.emf.ecore.EPackage.Registry
     * @see org.dengues.model.database.DatabasePackage#eNS_URI
     * @see #init()
     * @generated
     */
    private DatabasePackageImpl() {
        super(eNS_URI, DatabaseFactory.eINSTANCE);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private static boolean isInited = false;

    /**
     * Creates, registers, and initializes the <b>Package</b> for this
     * model, and for any others upon which it depends.  Simple
     * dependencies are satisfied by calling this method on all
     * dependent packages before doing anything else.  This method drives
     * initialization for interdependent packages directly, in parallel
     * with this package, itself.
     * <p>Of this package and its interdependencies, all packages which
     * have not yet been registered by their URI values are first created
     * and registered.  The packages are then initialized in two steps:
     * meta-model objects for all of the packages are created before any
     * are initialized, since one package's meta-model objects may refer to
     * those of another.
     * <p>Invocation of this method will not affect any packages that have
     * already been initialized.
     * <!-- begin-user-doc
     * --> <!-- end-user-doc -->
     * @see #eNS_URI
     * @see #createPackageContents()
     * @see #initializePackageContents()
     * @generated
     */
    public static DatabasePackage init() {
        if (isInited) return (DatabasePackage)EPackage.Registry.INSTANCE.getEPackage(DatabasePackage.eNS_URI);

        // Obtain or create and register package
        DatabasePackageImpl theDatabasePackage = (DatabasePackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof DatabasePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new DatabasePackageImpl());

        isInited = true;

        // Create package meta-data objects
        theDatabasePackage.createPackageContents();

        // Initialize created meta-data
        theDatabasePackage.initializePackageContents();

        // Mark meta-data to indicate it can't be changed
        theDatabasePackage.freeze();

        return theDatabasePackage;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getDBTable() {
        return dbTableEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDBTable_Columns() {
        return (EReference)dbTableEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBTable_OnlyRead() {
        return (EAttribute)dbTableEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getDBColumn() {
        return dbColumnEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDBColumn_Table() {
        return (EReference)dbColumnEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_Type() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_DefaultValue() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_Key() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_Nullable() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(4);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_Length() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(5);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_Precision() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(6);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDBColumn_Outputs() {
        return (EReference)dbColumnEClass.getEStructuralFeatures().get(7);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_OnlyRead() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(8);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDBColumn_Inputs() {
        return (EReference)dbColumnEClass.getEStructuralFeatures().get(9);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_Pattern() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(10);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBColumn_ForeignKey() {
        return (EAttribute)dbColumnEClass.getEStructuralFeatures().get(11);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getDatabaseDiagram() {
        return databaseDiagramEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDatabaseDiagram_Status() {
        return (EAttribute)databaseDiagramEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_DbChildren() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDatabaseDiagram_ConnId() {
        return (EAttribute)databaseDiagramEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDatabaseDiagram_WholeSql() {
        return (EAttribute)databaseDiagramEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_SectionColumns() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(4);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_SectionFilters() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(5);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_SectionGroups() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(6);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_SectionSorts() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(7);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_SectionHavings() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(8);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDatabaseDiagram_SectionUnions() {
        return (EReference)databaseDiagramEClass.getEStructuralFeatures().get(9);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDatabaseDiagram_Distinct() {
        return (EAttribute)databaseDiagramEClass.getEStructuralFeatures().get(10);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getForeignKey() {
        return foreignKeyEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getForeignKey_Source() {
        return (EReference)foreignKeyEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getForeignKey_Target() {
        return (EReference)foreignKeyEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getDBNote() {
        return dbNoteEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBNote_Text() {
        return (EAttribute)dbNoteEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDBNote_Opaque() {
        return (EAttribute)dbNoteEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getDiagramChild() {
        return diagramChildEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDiagramChild_X() {
        return (EAttribute)diagramChildEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDiagramChild_Y() {
        return (EAttribute)diagramChildEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDiagramChild_Width() {
        return (EAttribute)diagramChildEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDiagramChild_Height() {
        return (EAttribute)diagramChildEClass.getEStructuralFeatures().get(3);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDiagramChild_Id() {
        return (EAttribute)diagramChildEClass.getEStructuralFeatures().get(4);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EReference getDiagramChild_DbDiagram() {
        return (EReference)diagramChildEClass.getEStructuralFeatures().get(5);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getDiagramChild_Selected() {
        return (EAttribute)diagramChildEClass.getEStructuralFeatures().get(6);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getAbstractDBObject() {
        return abstractDBObjectEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAbstractDBObject_Properties() {
        return (EAttribute)abstractDBObjectEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAbstractDBObject_Name() {
        return (EAttribute)abstractDBObjectEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getAbstractDBObject_EmfType() {
        return (EAttribute)abstractDBObjectEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getSectionColumns() {
        return sectionColumnsEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionColumns_Value() {
        return (EAttribute)sectionColumnsEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionColumns_Expression() {
        return (EAttribute)sectionColumnsEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getSectionFilters() {
        return sectionFiltersEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionFilters_Value() {
        return (EAttribute)sectionFiltersEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionFilters_Logic() {
        return (EAttribute)sectionFiltersEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionFilters_Operator() {
        return (EAttribute)sectionFiltersEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getSectionGroups() {
        return sectionGroupsEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionGroups_Expression() {
        return (EAttribute)sectionGroupsEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getSectionSorts() {
        return sectionSortsEClass;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionSorts_Expression() {
        return (EAttribute)sectionSortsEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionSorts_OrderBy() {
        return (EAttribute)sectionSortsEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getSectionHavings() {
        return sectionHavingsEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionHavings_Value() {
        return (EAttribute)sectionHavingsEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionHavings_Logic() {
        return (EAttribute)sectionHavingsEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionHavings_Operator() {
        return (EAttribute)sectionHavingsEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EClass getSectionUnions() {
        return sectionUnionsEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionUnions_Union() {
        return (EAttribute)sectionUnionsEClass.getEStructuralFeatures().get(0);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionUnions_Queries() {
        return (EAttribute)sectionUnionsEClass.getEStructuralFeatures().get(1);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EAttribute getSectionUnions_Checked() {
        return (EAttribute)sectionUnionsEClass.getEStructuralFeatures().get(2);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    public EClass getForeignKeyLabel() {
        return foreignKeyLabelEClass;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EEnum getEMFDataType() {
        return emfDataTypeEEnum;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public EDataType getPropMap() {
        return propMapEDataType;
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public DatabaseFactory getDatabaseFactory() {
        return (DatabaseFactory)getEFactoryInstance();
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private boolean isCreated = false;

    /**
     * Creates the meta-model objects for the package.  This method is
     * guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public void createPackageContents() {
        if (isCreated) return;
        isCreated = true;

        // Create classes and their features
        dbTableEClass = createEClass(DB_TABLE);
        createEReference(dbTableEClass, DB_TABLE__COLUMNS);
        createEAttribute(dbTableEClass, DB_TABLE__ONLY_READ);

        dbColumnEClass = createEClass(DB_COLUMN);
        createEReference(dbColumnEClass, DB_COLUMN__TABLE);
        createEAttribute(dbColumnEClass, DB_COLUMN__TYPE);
        createEAttribute(dbColumnEClass, DB_COLUMN__DEFAULT_VALUE);
        createEAttribute(dbColumnEClass, DB_COLUMN__KEY);
        createEAttribute(dbColumnEClass, DB_COLUMN__NULLABLE);
        createEAttribute(dbColumnEClass, DB_COLUMN__LENGTH);
        createEAttribute(dbColumnEClass, DB_COLUMN__PRECISION);
        createEReference(dbColumnEClass, DB_COLUMN__OUTPUTS);
        createEAttribute(dbColumnEClass, DB_COLUMN__ONLY_READ);
        createEReference(dbColumnEClass, DB_COLUMN__INPUTS);
        createEAttribute(dbColumnEClass, DB_COLUMN__PATTERN);
        createEAttribute(dbColumnEClass, DB_COLUMN__FOREIGN_KEY);

        databaseDiagramEClass = createEClass(DATABASE_DIAGRAM);
        createEAttribute(databaseDiagramEClass, DATABASE_DIAGRAM__STATUS);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__DB_CHILDREN);
        createEAttribute(databaseDiagramEClass, DATABASE_DIAGRAM__CONN_ID);
        createEAttribute(databaseDiagramEClass, DATABASE_DIAGRAM__WHOLE_SQL);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__SECTION_COLUMNS);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__SECTION_FILTERS);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__SECTION_GROUPS);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__SECTION_SORTS);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__SECTION_HAVINGS);
        createEReference(databaseDiagramEClass, DATABASE_DIAGRAM__SECTION_UNIONS);
        createEAttribute(databaseDiagramEClass, DATABASE_DIAGRAM__DISTINCT);

        foreignKeyEClass = createEClass(FOREIGN_KEY);
        createEReference(foreignKeyEClass, FOREIGN_KEY__SOURCE);
        createEReference(foreignKeyEClass, FOREIGN_KEY__TARGET);

        dbNoteEClass = createEClass(DB_NOTE);
        createEAttribute(dbNoteEClass, DB_NOTE__TEXT);
        createEAttribute(dbNoteEClass, DB_NOTE__OPAQUE);

        diagramChildEClass = createEClass(DIAGRAM_CHILD);
        createEAttribute(diagramChildEClass, DIAGRAM_CHILD__X);
        createEAttribute(diagramChildEClass, DIAGRAM_CHILD__Y);
        createEAttribute(diagramChildEClass, DIAGRAM_CHILD__WIDTH);
        createEAttribute(diagramChildEClass, DIAGRAM_CHILD__HEIGHT);
        createEAttribute(diagramChildEClass, DIAGRAM_CHILD__ID);
        createEReference(diagramChildEClass, DIAGRAM_CHILD__DB_DIAGRAM);
        createEAttribute(diagramChildEClass, DIAGRAM_CHILD__SELECTED);

        abstractDBObjectEClass = createEClass(ABSTRACT_DB_OBJECT);
        createEAttribute(abstractDBObjectEClass, ABSTRACT_DB_OBJECT__PROPERTIES);
        createEAttribute(abstractDBObjectEClass, ABSTRACT_DB_OBJECT__NAME);
        createEAttribute(abstractDBObjectEClass, ABSTRACT_DB_OBJECT__EMF_TYPE);

        sectionColumnsEClass = createEClass(SECTION_COLUMNS);
        createEAttribute(sectionColumnsEClass, SECTION_COLUMNS__VALUE);
        createEAttribute(sectionColumnsEClass, SECTION_COLUMNS__EXPRESSION);

        sectionFiltersEClass = createEClass(SECTION_FILTERS);
        createEAttribute(sectionFiltersEClass, SECTION_FILTERS__VALUE);
        createEAttribute(sectionFiltersEClass, SECTION_FILTERS__LOGIC);
        createEAttribute(sectionFiltersEClass, SECTION_FILTERS__OPERATOR);

        sectionGroupsEClass = createEClass(SECTION_GROUPS);
        createEAttribute(sectionGroupsEClass, SECTION_GROUPS__EXPRESSION);

        sectionSortsEClass = createEClass(SECTION_SORTS);
        createEAttribute(sectionSortsEClass, SECTION_SORTS__EXPRESSION);
        createEAttribute(sectionSortsEClass, SECTION_SORTS__ORDER_BY);

        sectionHavingsEClass = createEClass(SECTION_HAVINGS);
        createEAttribute(sectionHavingsEClass, SECTION_HAVINGS__VALUE);
        createEAttribute(sectionHavingsEClass, SECTION_HAVINGS__LOGIC);
        createEAttribute(sectionHavingsEClass, SECTION_HAVINGS__OPERATOR);

        sectionUnionsEClass = createEClass(SECTION_UNIONS);
        createEAttribute(sectionUnionsEClass, SECTION_UNIONS__UNION);
        createEAttribute(sectionUnionsEClass, SECTION_UNIONS__QUERIES);
        createEAttribute(sectionUnionsEClass, SECTION_UNIONS__CHECKED);

        foreignKeyLabelEClass = createEClass(FOREIGN_KEY_LABEL);

        // Create enums
        emfDataTypeEEnum = createEEnum(EMF_DATA_TYPE);

        // Create data types
        propMapEDataType = createEDataType(PROP_MAP);
    }

    /**
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    private boolean isInitialized = false;

    /**
     * Complete the initialization of the package and its meta-model.  This
     * method is guarded to have no affect on any invocation but its first.
     * <!-- begin-user-doc --> <!-- end-user-doc -->
     * @generated
     */
    public void initializePackageContents() {
        if (isInitialized) return;
        isInitialized = true;

        // Initialize package
        setName(eNAME);
        setNsPrefix(eNS_PREFIX);
        setNsURI(eNS_URI);

        // Add supertypes to classes
        dbTableEClass.getESuperTypes().add(this.getDiagramChild());
        dbColumnEClass.getESuperTypes().add(this.getDiagramChild());
        databaseDiagramEClass.getESuperTypes().add(this.getAbstractDBObject());
        foreignKeyEClass.getESuperTypes().add(this.getAbstractDBObject());
        dbNoteEClass.getESuperTypes().add(this.getDiagramChild());
        diagramChildEClass.getESuperTypes().add(this.getAbstractDBObject());
        sectionColumnsEClass.getESuperTypes().add(this.getAbstractDBObject());
        sectionFiltersEClass.getESuperTypes().add(this.getAbstractDBObject());
        sectionGroupsEClass.getESuperTypes().add(this.getAbstractDBObject());
        sectionSortsEClass.getESuperTypes().add(this.getAbstractDBObject());
        sectionHavingsEClass.getESuperTypes().add(this.getAbstractDBObject());
        sectionUnionsEClass.getESuperTypes().add(this.getAbstractDBObject());
        foreignKeyLabelEClass.getESuperTypes().add(this.getDiagramChild());

        // Initialize classes and features; add operations and parameters
        initEClass(dbTableEClass, DBTable.class, "DBTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getDBTable_Columns(), this.getDBColumn(), this.getDBColumn_Table(), "columns", null, 0, -1, DBTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBTable_OnlyRead(), ecorePackage.getEBoolean(), "onlyRead", null, 0, 1, DBTable.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(dbColumnEClass, DBColumn.class, "DBColumn", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getDBColumn_Table(), this.getDBTable(), this.getDBTable_Columns(), "table", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_Type(), ecorePackage.getEString(), "type", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_DefaultValue(), ecorePackage.getEString(), "defaultValue", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_Key(), ecorePackage.getEBoolean(), "key", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_Nullable(), ecorePackage.getEBoolean(), "nullable", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_Length(), ecorePackage.getEInt(), "length", "-1", 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_Precision(), ecorePackage.getEInt(), "precision", "-1", 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDBColumn_Outputs(), this.getForeignKey(), this.getForeignKey_Source(), "outputs", null, 0, -1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_OnlyRead(), ecorePackage.getEBoolean(), "onlyRead", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDBColumn_Inputs(), this.getForeignKey(), this.getForeignKey_Target(), "inputs", null, 0, -1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_Pattern(), ecorePackage.getEString(), "pattern", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBColumn_ForeignKey(), ecorePackage.getEBoolean(), "foreignKey", null, 0, 1, DBColumn.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(databaseDiagramEClass, DatabaseDiagram.class, "DatabaseDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getDatabaseDiagram_Status(), ecorePackage.getEString(), "status", null, 0, 1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_DbChildren(), this.getDiagramChild(), this.getDiagramChild_DbDiagram(), "dbChildren", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDatabaseDiagram_ConnId(), ecorePackage.getEString(), "connId", null, 0, 1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDatabaseDiagram_WholeSql(), ecorePackage.getEString(), "wholeSql", null, 0, 1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_SectionColumns(), this.getSectionColumns(), null, "sectionColumns", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_SectionFilters(), this.getSectionFilters(), null, "sectionFilters", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_SectionGroups(), this.getSectionGroups(), null, "sectionGroups", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_SectionSorts(), this.getSectionSorts(), null, "sectionSorts", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_SectionHavings(), this.getSectionHavings(), null, "sectionHavings", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDatabaseDiagram_SectionUnions(), this.getSectionUnions(), null, "sectionUnions", null, 0, -1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDatabaseDiagram_Distinct(), ecorePackage.getEBoolean(), "distinct", null, 0, 1, DatabaseDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(foreignKeyEClass, ForeignKey.class, "ForeignKey", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEReference(getForeignKey_Source(), this.getDBColumn(), this.getDBColumn_Outputs(), "source", null, 0, 1, ForeignKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getForeignKey_Target(), this.getDBColumn(), this.getDBColumn_Inputs(), "target", null, 0, 1, ForeignKey.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(dbNoteEClass, DBNote.class, "DBNote", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getDBNote_Text(), ecorePackage.getEString(), "text", null, 0, 1, DBNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDBNote_Opaque(), ecorePackage.getEBoolean(), "opaque", null, 0, 1, DBNote.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(diagramChildEClass, DiagramChild.class, "DiagramChild", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getDiagramChild_X(), ecorePackage.getEInt(), "x", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDiagramChild_Y(), ecorePackage.getEInt(), "y", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDiagramChild_Width(), ecorePackage.getEInt(), "width", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDiagramChild_Height(), ecorePackage.getEInt(), "height", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDiagramChild_Id(), ecorePackage.getEString(), "id", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEReference(getDiagramChild_DbDiagram(), this.getDatabaseDiagram(), this.getDatabaseDiagram_DbChildren(), "dbDiagram", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getDiagramChild_Selected(), ecorePackage.getEBoolean(), "selected", null, 0, 1, DiagramChild.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(abstractDBObjectEClass, AbstractDBObject.class, "AbstractDBObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getAbstractDBObject_Properties(), this.getPropMap(), "properties", " ", 1, 1, AbstractDBObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAbstractDBObject_Name(), ecorePackage.getEString(), "name", null, 0, 1, AbstractDBObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getAbstractDBObject_EmfType(), this.getEMFDataType(), "emfType", null, 0, 1, AbstractDBObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(sectionColumnsEClass, SectionColumns.class, "SectionColumns", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getSectionColumns_Value(), ecorePackage.getEString(), "value", null, 0, 1, SectionColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionColumns_Expression(), ecorePackage.getEString(), "expression", null, 0, 1, SectionColumns.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(sectionFiltersEClass, SectionFilters.class, "SectionFilters", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getSectionFilters_Value(), ecorePackage.getEString(), "value", null, 0, 1, SectionFilters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionFilters_Logic(), ecorePackage.getEString(), "logic", null, 0, 1, SectionFilters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionFilters_Operator(), ecorePackage.getEString(), "operator", null, 0, 1, SectionFilters.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(sectionGroupsEClass, SectionGroups.class, "SectionGroups", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getSectionGroups_Expression(), ecorePackage.getEString(), "expression", null, 0, 1, SectionGroups.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(sectionSortsEClass, SectionSorts.class, "SectionSorts", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getSectionSorts_Expression(), ecorePackage.getEString(), "expression", null, 0, 1, SectionSorts.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionSorts_OrderBy(), ecorePackage.getEString(), "orderBy", null, 0, 1, SectionSorts.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(sectionHavingsEClass, SectionHavings.class, "SectionHavings", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getSectionHavings_Value(), ecorePackage.getEString(), "value", null, 0, 1, SectionHavings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionHavings_Logic(), ecorePackage.getEString(), "logic", null, 0, 1, SectionHavings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionHavings_Operator(), ecorePackage.getEString(), "operator", null, 0, 1, SectionHavings.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(sectionUnionsEClass, SectionUnions.class, "SectionUnions", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
        initEAttribute(getSectionUnions_Union(), ecorePackage.getEString(), "union", null, 0, 1, SectionUnions.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionUnions_Queries(), ecorePackage.getEString(), "queries", null, 0, 1, SectionUnions.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
        initEAttribute(getSectionUnions_Checked(), ecorePackage.getEBoolean(), "checked", null, 0, 1, SectionUnions.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);

        initEClass(foreignKeyLabelEClass, ForeignKeyLabel.class, "ForeignKeyLabel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);

        // Initialize enums and add enum literals
        initEEnum(emfDataTypeEEnum, EMFDataType.class, "EMFDataType");
        addEEnumLiteral(emfDataTypeEEnum, EMFDataType.DATABASE_LITERAL);
        addEEnumLiteral(emfDataTypeEEnum, EMFDataType.QUERY_LITERAL);

        // Initialize data types
        initEDataType(propMapEDataType, HashMap.class, "PropMap", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);

        // Create resource
        createResource(eNS_URI);
    }

} // DatabasePackageImpl
